<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="./style.css">
  <title>Document</title>
</head>

<body>
  <section>
    <span class="curve">
      <img src="./curve.png" alt="">
    </span>
  </section>
  <script>

    var scroll = document.querySelector('.curve');
    window.addEventListener('scroll', function () {
      var value = 1 + window.scrollY / -500;

      scroll.style.transform = `scaleY(${value})`;
    })
  </script>
</body>

</html>